package com.atguigu.day14.test05;

/**
 * @author fenge
 */
public class Test05 {
    public static void main(String[] args) {
        System.out.print("随机数为：");
        double d = Math.random() * 100;
        System.out.println(d);
        System.out.println("转换为：");
        String s = String.valueOf(d);
        System.out.println(s.substring(0,s.indexOf(".") + 3));

    }
}
